package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.entity.Orderlist;
import com.example.demo.entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product> {
    // 根据用户id查询信息
    List<Product> findByUserId(@Param("userId") Integer userId);

    // 一对多查询
    Page<Product> findPage(Page<Product> page, @Param("name") String name);
}
